(function (angular) {
    angular.module('app').service('httpGet',['$http',function ($http) {
        this.get=function (success,error) {

            $http({
                url:'http://localhost/home.php',
                method:'jsonp',
            }).then(function (res) {
                success(res.data.posts)


            }).catch(function (error) {
                error(error);
            })
        }
    }])
})(angular);
